#!/usr/bin/perl
use strict;
package motd;

sub motd {
    my ($remote,$input,$num) = @_;
    open (MOTD,"./motd") or print $remote "$num 356 $input :Motd file is missing.\n";
    print $remote "$num 345 $input :Message of the day - CSWorld IRC Services\n";
    while (<MOTD>) {
        print $remote "$num 345 $input :- $_\n";
    }
    close(MOTD);
    print $remote "$num 345 $input :End of /MOTD Command.\n";
}
1;
